<?php

// @author 3ogx <3ogx.com@gmail.com>

namespace Jushuitan;

use Illuminate\Support\Str;

class Factory
{
    public static function __callStatic($name, $arguments)
    {
        return self::make($name, ...$arguments);
    }

    public static function make($name, array $config)
    {
        $namespace   = Str::studly($name);
        $application = __NAMESPACE__ . '\\' . $namespace;

        return new $application($config);
    }
}
